<?php
/**
 * TradeConstant
 *
 * @author fusq
 * 
 */
class TradeConstant {
	
    public static function getTradeTypeList(){
        $type=array(
	        12 => 2,
	        22 => 1,
	        32 => 3,
        );
        return $type;
    }	
    
    public static function getTradeType($key){
        $type = TradeConstant::getTradeTypeList();
        return $type[$key];
    } 

    //withdraw and supplement type
    public static function getTypeList(){
        $translate = Zend_Registry::get('Zend_Translate');
        $type=array(
        0 => $translate->_('IsNotWithDrawLog'),
        1 => $translate->_('Alipay'),
        2 => $translate->_('PayAll'),
        3 => $translate->_('NetBank'),
        11 => $translate->_('BankBookTurn'),
        12 => $translate->_('Remit'),
        13 => $translate->_('Cash'),
        14 => $translate->_('ChinaBank'),
        15 => $translate->_('ICBC'),
        16 => $translate->_('CCB'),
        17 => $translate->_('BOCM'),
        18 => $translate->_('ABOC'),
        19 => $translate->_('CMB'),
        20 => $translate->_('BJB'),
        21 => $translate->_('CIB'),
        22 => $translate->_('SPDB'),
        23 => $translate->_('CMBC'),
        24 => $translate->_('SZDB'),
        25 => $translate->_('CCB')
        );
        return $type;
    }

    //get the withdraw or supplement type_value
    public static function getType($key){
        $type = TradeConstant::getTypeList();
        return $type[$key];
    }

    //get the supplement and withdraw status
    public static function getStatusList(){
        $translate = Zend_Registry::get('Zend_Translate');
        $status = array(
        0 => $translate->_('ineffective'),
        1 => $translate->_('effective'),
        2 => $translate->_('insupplement'),
        3 => $translate->_('supplemented'),
        4 => $translate->_('intransfer'),
        5 => $translate->_('transfered'),
        6 => $translate->_('waitCheck'),
        7 => $translate->_('refuse')
        );
        return $status;
    }

    //get the withdraw_log_statu_value
    public static function getStatus($key){
        $status = TradeConstant::getStatusList();
        return $status[$key];
    }

    //get withdraw type list
    public static function getWithdrawStatusList(){
        $translate = Zend_Registry::get('Zend_Translate');
        $status = array(
        4 => $translate->_('intransfer'),
        5 => $translate->_('transfered'),
        7 => $translate->_('refuse')
        );
        return $status;
    }

    //get online supplement status list
    public static function getOnlineSupplementStatusList(){
        $translate = Zend_Registry::get('Zend_Translate');
        $status = array(
        2 => $translate->_('insupplement'),
        3 => $translate->_('supplemented'),
        );
        return $status;
    }

    //get offline supplement status list
    public static function getOfflineSupplementStatusList(){
        $translate = Zend_Registry::get('Zend_Translate');
        $status = array(
        2 => $translate->_('insupplement'),
        3 => $translate->_('supplemented'),
        7 => $translate->_('refuse')
        );
        return $status;
    }

    //get bank typelist
    public static function getBankTypeList(){
        $translate = Zend_Registry::get('Zend_Translate');
        $type=array(
        14 => $translate->_('ChinaBank'),
        15 => $translate->_('ICBC'),
        16 => $translate->_('CCB'),
        17 => $translate->_('BOCM'),
        18 => $translate->_('ABOC'),
        19 => $translate->_('CMB'),
        20 => $translate->_('BJB'),
        21 => $translate->_('CIB'),
        22 => $translate->_('SPDB'),
        23 => $translate->_('CMBC'),
        24 => $translate->_('SZDB'),
        25 => $translate->_('CCB')
        );
        return $type;
    }

    //get bank type value
    public static function getBank($key){
        $bankList = TradeConstant::getBankTypeList();
        return $bankList[$key];
    }

    //get -5 year list
    public static function get_5YearList(){
        $year = array();
        $y = intval(date("Y"));
        for($i=1; $i<=5; $i++){
            $year[$y] = $y;
            $y--;
        }
        return $year;
    }

    //get 12 month list
    public static function getMonthList(){
        $month = array(
        1 => '01',
        2 => '02',
        3 => '03',
        4 => '04',
        5 => '05',
        6 => '06',
        7 => '07',
        8 => '08',
        9 => '09',
        10 => '10',
        11 => '11',
        12 => '12'
        );
        return $month;
    }

    //get hour list
    public static function getHourList(){
        $type=array(
        '00' => '00',
        '01' => '01',
        '02' => '02',
        '03' => '03',
        '04' => '04',
        '05' => '05',
        '06' => '06',
        '07' => '07',
        '08' => '08',
        '09' => '09',
        '10' => '10',
        '11' => '11',
        '12' => '12',
        '13' => '13',
        '14' => '14',
        '15' => '15',
        '16' => '16',
        '17' => '17',
        '18' => '18',
        '19' => '19',
        '20' => '20',
        '21' => '21',
        '22' => '22',
        '23' => '23'
        );
        return $type;
    }

    //get minute list
    public static function getMinuteList(){
        $type=array(
        '00' => '00',
        '01' => '01',
        '02' => '02',
        '03' => '03',
        '04' => '04',
        '05' => '05',
        '06' => '06',
        '07' => '07',
        '08' => '08',
        '09' => '09',
        '10' => '10',
        '11' => '11',
        '12' => '12',
        '13' => '13',
        '14' => '14',
        '15' => '15',
        '16' => '16',
        '17' => '17',
        '18' => '18',
        '19' => '19',
        '20' => '20',
        '21' => '21',
        '22' => '22',
        '23' => '23',
        '24' => '24',
        '25' => '25',
        '26' => '26',
        '27' => '27',
        '28' => '28',
        '29' => '29',
        '30' => '30',
        '31' => '31',
        '32' => '32',
        '33' => '33',
        '34' => '34',
        '35' => '35',
        '36' => '36',
        '37' => '37',
        '38' => '38',
        '39' => '39',
        '40' => '40',
        '41' => '41',
        '42' => '42',
        '43' => '43',
        '44' => '44',
        '45' => '45',
        '46' => '46',
        '47' => '47',
        '48' => '48',
        '49' => '49',
        '50' => '50',
        '51' => '51',
        '52' => '52',
        '53' => '53',
        '54' => '54',
        '55' => '55',
        '56' => '56',
        '57' => '57',
        '58' => '58',
        '59' => '59'
        );
        return $type;
    }

    // Online supplement_type
    public function getOnlineSupplementType(){
        return array("2", "3");
    }

    // Offline supplement_type
    public function getOfflineSupplementType(){
        return array("11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25");
    } 
}